package com.jiahao.material.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jiahao.material.entity.Warehouseing;
import org.apache.ibatis.annotations.Many;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface WarehouseingMapper extends BaseMapper<Warehouseing> {

    @Results(id = "warehouseingMap",value = {
            @Result(id = true,column = "id",property = "id"),
            @Result(column = "wcode",property = "wcode"),
            @Result(column = "supplierId",property = "supplierId"),
            @Result(column = "materialId",property = "materialId"),
            @Result(column = "warehouseId",property = "warehouseId"),
            @Result(column = "count",property = "count"),
            @Result(column = "manager",property = "manager"),
            @Result(column = "remarks",property = "remarks"),
            @Result(column = "createTime",property = "createTime"),
            @Result(column = "updateTime",property = "updateTime"),
            @Result(column = "status",property = "status"),
            @Result(column = "supplierStatus",property = "supplierStatus"),
    })
    @Select("select * from warehouseing where status = '01' and supplierId = #{sid}")
    public List<Warehouseing> getAccessBySid(String sid);
}
